<!--
 * @FilePath     : /study_code/css/border-image-slice.html
 * @Description  :
 * @Date         : 2025-04-28 09:16:03
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-04-28 10:05:01
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="./style/border-image.css" />
    <style>
      .box {
        border: 30px solid red;
        border-image-source: url(./images/border.png);
        /* border-image-slice: 30; */
        border-image-width: 1;
        border-image-outset: 0;
        border-image-repeat: stretch;
      }

      .box1 {
        /* 仅指定了1个位置（1 个值）时：4个相同的宽度/高度。 （上面边框宽度正好是30） */
        border-image-slice: 30;
      }

      /* 仅指定了2个位置（2 个值）时：上下 左右。 */
      .box2 {
        border-image-slice: 30 10;
        border-width: 30px 10px 30px 10px;
      }
    </style>
  </head>
  <body>
    <h2>30</h2>
    <div class="box box1"></div>

    <hr />

    <h2>30 10</h2>
    <div class="box box2"></div>
  </body>
</html>
